/* 登录页面样式 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.logo-img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.subtitle {
    color: #666;
    font-size: 16px;
    margin: 0;
}

.login-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.icon {
    position: absolute;
    left: 12px;
    font-size: 16px;
    color: #999;
    z-index: 1;
}

.form-input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #999;
    padding: 0;
}

.password-toggle:hover {
    color: #667eea;
}

.error-message {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    color: #c33;
    font-size: 14px;
    margin-bottom: 20px;
}

.error-icon {
    margin-right: 8px;
    font-size: 16px;
}

.login-button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.login-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.login-footer {
    text-align: center;
}

.register-link {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

.link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.link:hover {
    text-decoration: underline;
}

.test-accounts {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.test-accounts h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.account-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.account-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

.role {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    min-width: 50px;
    text-align: center;
}

.role.admin {
    background: #dc3545;
}

.role.teacher {
    background: #fd7e14;
}

.role.student {
    background: #28a745;
}

.credentials {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #666;
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }

    .logo-text {
        font-size: 24px;
    }

    .account-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}